const calculate = (number1, number2, spaces) => {
    if (spaces === 'add') {
        return number1 + number2;
    } else if (spaces === 'subtract') {
        return number1 - number2;
    } else if (spaces === 'multiply') {
        return number1 * number2;
    } else if (spaces === 'divide') {
        return number1 / number2;
    }else {
        return '无效的操作';
    }
}
console.log(calculate(5,4,'add'));
console.log(calculate(8,5,'subtract'));
console.log(calculate(3,4,'multiply'));
console.log(calculate(9,3,'divide'));
console.log(calculate(5,4,'skhfjfkj'));